package com.cls.business.service;

import com.cls.business.entity.DeclareTopic;
import com.cls.business.entity.EntrustTopic;

import com.cls.business.entity.TopicSubjectDetail;
import com.cls.common.entity.QueryRequest;
import com.github.pagehelper.PageInfo;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 *  Service接口
 *
 * @author slx
 * @date 2020-12-10 17:17:35
 */
public interface IEntrustTopicService extends IService<EntrustTopic> {
    /**
     * 查询（分页）
     *
     * @param request QueryRequest
     * @param entrustTopic entrustTopic
     * @return PageInfo<EntrustTopic>
     */
    PageInfo<EntrustTopic> findEntrustTopics(QueryRequest request, EntrustTopic entrustTopic);

    /**
     * 查询（所有）
     *
     * @param entrustTopic entrustTopic
     * @return List<EntrustTopic>
     */
    List<EntrustTopic> findEntrustTopics(EntrustTopic entrustTopic);

    /**
     * 新增
     *
     * @param entrustTopic entrustTopic
     */
    void createEntrustTopic(EntrustTopic entrustTopic);

    /**
     * 修改
     *
     * @param entrustTopic entrustTopic
     */
    void updateEntrustTopic(EntrustTopic entrustTopic);

    /**
     * 删除
     *
     * @param ids ids
     */
    void deleteEntrustTopics(String[] ids);


    boolean autoWriteSubjectType(List<EntrustTopic> topics, List<DeclareTopic> declareTopics, List<TopicSubjectDetail> details);

    List<EntrustTopic> findEntrustTopicsByPlanId(Long planId);
}
